package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class TextUploadRequest extends BaseUploadRequest {

    public static final String PATH = BaseRequest.PATH + "api/post_text";

    private String text;

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        TextUploadRequestBody body = new TextUploadRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setUuid(getUuid());
        body.setBabyID(getBabyID());
        body.setText(getText());
        body.setLabel(getLabel());
        body.setLabelId(getLabelId());
        body.setCreateTS(getCreateTS());
        body.setState(getState());
        return body;
    }

    private class TextUploadRequestBody extends BaseUploadRequestBody {

        @SerializedName("Text")
        private String text;

        private TextUploadRequestBody() {
            setSv(BaseRequestConfig.SV_TEXT_UPLOAD);
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }
    }
}
